package com.qx.chat.system.service;

import java.util.Date;

import com.alibaba.fastjson.JSONArray;
import com.qx.chat.system.entity.ChatMessageRecord;
import com.qx.chat.system.message.TextMessage;

/**
 * TODO
 * @author cyf
 * @version TODO
 */
public interface ChatRecordService {
	/// <summary>
    /// 插入一条聊天记录（包括群聊天记录）。
    /// </summary>  
    public ChatMessageRecord insertChatMessageRecord(TextMessage message,Integer chatType);

    
    /// <summary>
    /// 获取一页与好友的聊天记录。
    /// </summary>
    /// <param name="timeScope">日期范围</param>
    /// <param name="myID">自己的UserID</param>
    /// <param name="friendID">好友的ID</param>
    /// <param name="pageSize">页大小</param>
    /// <param name="pageIndex">页索引</param>      
    /// <returns>聊天记录页</returns>
    public JSONArray getChatRecordPage(Date startTime,Date endTime, String myID, String friendID, int pageSize, int pageIndex); 
}
